package com.worldtolearn.offer.bu;

import java.io.Serializable;
import java.util.List;

import javax.inject.Inject;
import javax.inject.Named;

import org.springframework.stereotype.Service;

import com.worldtolearn.offer.dao.SupplierOfferDao;
import com.worldtolearn.offer.entity.SupplierOffer;

@Named
public class SupplierOfferBu implements ISupplierOfferBu, Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Inject
	SupplierOfferDao supplierOfferDao;

	@Override
	public void createSupplierOffer(SupplierOffer supplierOffer) {
		System.out.println(supplierOfferDao);
		supplierOfferDao.createSupplierOffer(supplierOffer);

	}

	@Override
	public void deleteSupplierOffer(SupplierOffer supplierOffer) {
		supplierOfferDao.deleteSupplierOffer(supplierOffer);

	}

	@Override
	public List<SupplierOffer> getAllSupplierOffer() {
		return supplierOfferDao.getAllSupplierOffer();
	}

	@Override
	public List<SupplierOffer> getSupplierOfferByActivity(String activity) {
		return supplierOfferDao.getSupplierOfferByActivity(activity);
	}

	public SupplierOfferDao getSupplierOfferDao() {
		return supplierOfferDao;
	}

	public void setSupplierOfferDao(SupplierOfferDao supplierOfferDao) {
		this.supplierOfferDao = supplierOfferDao;
	}

}
